//
//  TFGalleryModeLive.swift
//  TalkfunSDKDemo
//
//  Created by 莫瑞权 on 2022/5/19.
//  Copyright © 2022 Talkfun. All rights reserved.
//

import UIKit

 //画廊模式
public class TFGalleryModeLive: UIViewController {
    @objc let touchView = TalkfunHitTestView()
    @objc let noStartView = UIView()
    //占位图
    @objc let noStartImg = UIImageView()
    @objc let nameLab = UILabel()
    //视频区域
    @objc let videoArea = TFGalleryView()

    public override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }
    
   @objc func addTouchView()
    {

        self.touchView.frame = self.view.bounds
        
        self.touchView.backgroundColor = UIColor(red: 28/255.0, green: 31/255.0, blue: 35/255.0, alpha: 1)
        self.view.addSubview(self.touchView)
     
        self.addvideoArea()
        self.addNostartView()
       
    }

    //2.视频区域
   func addvideoArea()
    {

        self.videoArea.isHidden = false

        self.videoArea.frame = self.touchView.bounds
        
        self.videoArea.backgroundColor = UIColor(red: 19/255.0, green: 21/255.0, blue: 5/255.0, alpha: 1)
        self.touchView.addSubview(self.videoArea)
        
    }

    //未直播view
    func addNostartView()
    {

        self.noStartView.backgroundColor = UIColor(red: 33/255.0, green: 38/255.0, blue: 46/255.0, alpha: 1)
        self.noStartView.isHidden = true
        self.touchView.addSubview(self.noStartView)
        

        self.noStartImg.image = UIImage.init(named: "HTLive.bundle/weikaibo")
       
        self.noStartView.addSubview(self.noStartImg)
        
        self.nameLab.font = UIFont.PingFang(size: 11)
        self.nameLab.textColor = UIColor.white
        
        self.nameLab.backgroundColor = UIColor(red: 23/255.0, green: 145/255.0, blue: 251/255.0, alpha: 1)
        self.nameLab.layer.cornerRadius = 3.0
        self.nameLab.textAlignment = .center
        self.noStartView.addSubview(self.nameLab)
        self.noStartView.frame = CGRect(x: 83.5, y: 0, width: self.touchView.frame.size.width-167, height: self.touchView.frame.size.height)
        
 
        self.noStartImg.frame = CGRect(x: (self.noStartView.frame.size.width-160)/2, y: (self.noStartView.frame.size.height-160)/2, width: 160, height: 160)
        
    }
   
}
